package com.linzm.behavioraltype.interpreter03.experssion;

/**
 * @Author zimingl
 * @Date 2023/4/16 3:10
 * @Description: TerminalExpression
 */
public class TerminalExpression implements Expression {
    private String name;

    public TerminalExpression(String name) {
        this.name = name;
    }

    @Override
    public boolean interpret(String context) {
        if (context.contains(name)) {
            return true;
        }
        return false;
    }
}
